package com.wy.business.market.apps.services;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.wy.framework.constants.Constants;
import com.wy.framework.dao.ErrorSqlException;
import com.wy.framework.services.AbstractBaseService;

/**
 * 项目名称：openportal
 * 类名称：UpgradeAuditService
 * 类描述：我的APP仓库_升级审核
 * 创建人：黄忠
 * 创建时间：2016-3-21 上午11:47:28
 * 修改人：黄忠
 * 修改时间：2016-3-21 上午11:47:28
 * 版本信息：@version 1.0
 * Copyright (c) 2016万雍科技（上海）有限公司-版权所有  
 * 修改备注：
 * @version 
 */
@Service
public class UpgradeAuditService extends AbstractBaseService {

	@SuppressWarnings("unused")
	private static final char[] object = null;
	
	@SuppressWarnings("unused")
	private static Logger logger = LoggerFactory.getLogger(UpgradeAuditService.class);
	
	@SuppressWarnings("rawtypes")
	public List list(String tab) throws ErrorSqlException {
		
		String stateSql = "";
		//审核中
		if(StringUtils.equals(tab, "tab1_1"))
			stateSql = " AND F.STATE in ('"+Constants.UPDATE_PENDING+"') ";
		//通过
		else if(StringUtils.equals(tab, "tab1_2"))
			stateSql = " AND F.STATE in ('"+Constants.ACCEPTANCE_BY+"') ";
		//驳回
		else
			stateSql = " AND F.STATE in ('"+Constants.UPDATE_REJECTED+"') ";
		return dataBaseDao.queryForList("t_sys_function.listNewAudit",null,stateSql);
	}
	
}
